package d0304d0305;

public class Racing {
    int topSpeed=100;

    void upgradeEngine(){
        RepairFactory factory=new RepairFactory();
        factory.upgradeEngine(this);
    }

    public static void main(String[] args) {
        Racing rac=new Racing();
        System.out.println("升级前最高时速："+rac.topSpeed);
        rac.upgradeEngine();
        System.out.println("升级为最高时速："+rac.topSpeed);
    }
}
